package com.example.myblog.dao;

import com.example.myblog.entity.Blog;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;

@Mapper
public interface BlogMapper {

    Page<Blog> findBlogAll();

    Page<Blog> findBlogByCondition(Map<String,Object> map);

    Page<Blog> findBlogBySearch(String searchParam);

    Page<Blog> topColNum(String type,Integer num);

    List<Blog> findBlogByIds(List<Integer> ids);

    List<Blog> findByYear(String year);

    Integer countBlog();

    List<Blog> topRecNum(Integer num);

    Blog findBlogById(Integer id);

    int updateBlog(Blog blog);

    int addBlog(Blog blog);

    int deleteBlogById(Integer id);
}
